home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / CPP / WFC010.ZIP / SRC / STRUCTS.CPP < prev    next >
C/C++ Source or Header  |  1995-12-07  |  68KB  |  1,983 lines

  1. #include <wfc.h>
  2. #pragma hdrstop
  3.  
  4. /*
  5. ** Author: Samuel R. Blackburn
  6. ** CI$: 76300,326
  7. ** Internet: sammy@sed.csc.com
  8. **
  9. ** You can use it any way you like as long as you don't try to sell it.
  10. **
  11. ** Any attempt to sell WFC in source code form must have the permission
  12. ** of the original author. You can produce commercial executables with
  13. ** WFC but you can't sell WFC.
  14. **
  15. ** Copyright, 1995, Samuel R. Blackburn
  16. **
  17. ** $Workfile: $
  18. ** $Revision: $
  19. ** $Modtime: $
  20. */
  21.  
  22. #if defined( _DEBUG )
  23. #undef THIS_FILE
  24. static char BASED_CODE THIS_FILE[] = __FILE__;
  25. #define new DEBUG_NEW
  26. #endif
  27.  
  28. CAccessAllowedEntry::CAccessAllowedEntry()
  29. {
  30.    Empty();
  31. }
  32.  
  33. CAccessAllowedEntry::CAccessAllowedEntry( const CAccessAllowedEntry& source )
  34. {
  35.    Empty();
  36.    Copy( source );
  37. }
  38.  
  39. CAccessAllowedEntry::CAccessAllowedEntry( const ACCESS_ALLOWED_ACE * source )
  40. {
  41.    Empty();
  42.    Copy( source );
  43. }
  44.  
  45. CAccessAllowedEntry::~CAccessAllowedEntry()
  46. {
  47.    Empty();
  48. }
  49.  
  50. void CAccessAllowedEntry::Copy( const CAccessAllowedEntry& source )
  51. {
  52.    Copy( (const ACCESS_ALLOWED_ACE *) &source );
  53. }
  54.  
  55. void CAccessAllowedEntry::Copy( const ACCESS_ALLOWED_ACE * source )
  56. {
  57.    ASSERT( source != NULL );
  58.  
  59.    if ( source == NULL )
  60.    {
  61.       return;
  62.    }
  63.  
  64.    Header.AceType  = source->Header.AceType;
  65.    Header.AceFlags = source->Header.AceFlags;
  66.    Header.AceSize  = source->Header.AceSize;
  67.    Mask            = source->Mask;
  68.    SidStart        = source->SidStart;
  69. }
  70.  
  71. #if defined( _DEBUG )
  72.  
  73. void CAccessAllowedEntry::Dump( CDumpContext& dump_context ) const
  74. {
  75.    dump_context << " a CAccessAllowedEntry at " << (void *) this << "\n";
  76.    dump_context << "{\n";
  77.    dump_context << "   Header.AceType = "  << Header.AceType  << "\n";
  78.    dump_context << "   Header.AceFlags = " << Header.AceFlags << "\n";
  79.    dump_context << "   Header.AceSize = "  << Header.AceSize  << "\n";
  80.    dump_context << "   Mask = "            << Mask            << "\n";
  81.    dump_context << "   SidStart = "        << SidStart        << "\n";
  82.    dump_context << "}\n";
  83. }
  84.  
  85. #endif // _DEBUG
  86.  
  87. void CAccessAllowedEntry::Empty( void )
  88. {
  89.    // ACE_HEADER
  90.    Header.AceType  = 0;
  91.    Header.AceFlags = 0;
  92.    Header.AceSize  = 0;
  93.  
  94.    // ACE_MASK
  95.    Mask            = 0;
  96.  
  97.    SidStart        = 0;
  98. }
  99.  
  100. CAccessControlEntryHeader::CAccessControlEntryHeader()
  101. {
  102.    Empty();
  103. }
  104.  
  105. CAccessControlEntryHeader::CAccessControlEntryHeader( const CAccessControlEntryHeader& source )
  106. {
  107.    Empty();
  108.    Copy( source );
  109. }
  110.  
  111. CAccessControlEntryHeader::CAccessControlEntryHeader( const ACE_HEADER * source )
  112. {
  113.    Empty();
  114.    Copy( source );
  115. }
  116.  
  117. CAccessControlEntryHeader::~CAccessControlEntryHeader()
  118. {
  119.    Empty();
  120. }
  121.  
  122. void CAccessControlEntryHeader::Copy( const CAccessControlEntryHeader& source )
  123. {
  124.    Copy( (const ACE_HEADER *) &source );
  125. }
  126.  
  127. void CAccessControlEntryHeader::Copy( const ACE_HEADER * source )
  128. {
  129.    ASSERT( source != NULL );
  130.  
  131.    if ( source == NULL )
  132.    {
  133.       return;
  134.    }
  135.  
  136.    AceType  = source->AceType;
  137.    AceFlags = source->AceFlags;
  138.    AceSize  = source->AceSize;
  139. }
  140.  
  141. #if defined( _DEBUG )
  142.  
  143. void CAccessControlEntryHeader::Dump( CDumpContext& dump_context ) const
  144. {
  145.    dump_context << " a CAccessControlEntryHeader at " << (void *) this << "\n";
  146.    dump_context << "{\n";
  147.    dump_context << "   AceType = "  << AceType  << "\n";
  148.    dump_context << "   AceFlags = " << AceFlags << "\n";
  149.    dump_context << "   AceSizee = " << AceSize     << "\n";
  150.    dump_context << "}\n";
  151. }
  152.  
  153. #endif // _DEBUG
  154.  
  155. void CAccessControlEntryHeader::Empty( void )
  156. {
  157.    AceType  = 0;
  158.    AceFlags = 0;
  159.    AceSize  = 0;
  160. }
  161.  
  162. CAccessControlList::CAccessControlList()
  163. {
  164.    Empty();
  165. }
  166.  
  167. CAccessControlList::CAccessControlList( const CAccessControlList& source )
  168. {
  169.    Empty();
  170.    Copy( source );
  171. }
  172.  
  173. CAccessControlList::CAccessControlList( const ACL * source )
  174. {
  175.    Empty();
  176.    Copy( source );
  177. }
  178.  
  179. CAccessControlList::~CAccessControlList()
  180. {
  181.    Empty();
  182. }
  183.  
  184. void CAccessControlList::Copy( const CAccessControlList& source )
  185. {
  186.    Copy( (const ACL *) &source );
  187. }
  188.  
  189. void CAccessControlList::Copy( const ACL * source )
  190. {
  191.    ASSERT( source != NULL );
  192.  
  193.    if ( source == NULL )
  194.    {
  195.       return;
  196.    }
  197.  
  198.    AclRevision = source->AclRevision;
  199.    Sbz1        = source->Sbz1;
  200.    AclSize     = source->AclSize;
  201.    AceCount    = source->AceCount;
  202.    Sbz2        = source->Sbz1;
  203. }
  204.  
  205. #if defined( _DEBUG )
  206.  
  207. void CAccessControlList::Dump( CDumpContext& dump_context ) const
  208. {
  209.    dump_context << " a CAccessControlList at " << (void *) this << "\n";
  210.    dump_context << "{\n";
  211.    dump_context << "   AclRevision = " << AclRevision << "\n";
  212.    dump_context << "   Sbz1 = "        << Sbz1        << "\n";
  213.    dump_context << "   AclSize = "     << AclSize     << "\n";
  214.    dump_context << "   AceCount = "    << AceCount    << "\n";
  215.    dump_context << "   Sbz2 = "        << Sbz2        << "\n";
  216.    dump_context << "}\n";
  217. }
  218.  
  219. #endif // _DEBUG
  220.  
  221. void CAccessControlList::Empty( void )
  222. {
  223.    AclRevision = ACL_REVISION;
  224.    Sbz1        = 0;
  225.    AclSize     = 0;
  226.    AceCount    = 0;
  227.    Sbz2        = 0;
  228. }
  229.  
  230. CAccessDeniedEntry::CAccessDeniedEntry()
  231. {
  232.    Empty();
  233. }
  234.  
  235. CAccessDeniedEntry::CAccessDeniedEntry( const CAccessDeniedEntry& source )
  236. {
  237.    Empty();
  238.    Copy( source );
  239. }
  240.  
  241. CAccessDeniedEntry::CAccessDeniedEntry( const ACCESS_DENIED_ACE * source )
  242. {
  243.    Empty();
  244.    Copy( source );
  245. }
  246.  
  247. CAccessDeniedEntry::~CAccessDeniedEntry()
  248. {
  249.    Empty();
  250. }
  251.  
  252. void CAccessDeniedEntry::Copy( const CAccessDeniedEntry& source )
  253. {
  254.    Copy( (const ACCESS_DENIED_ACE *) &source );
  255. }
  256.  
  257. void CAccessDeniedEntry::Copy( const ACCESS_DENIED_ACE * source )
  258. {
  259.    ASSERT( source != NULL );
  260.  
  261.    if ( source == NULL )
  262.    {
  263.       return;
  264.    }
  265.  
  266.    Header.AceType  = source->Header.AceType;
  267.    Header.AceFlags = source->Header.AceFlags;
  268.    Header.AceSize  = source->Header.AceSize;
  269.    Mask            = source->Mask;
  270.    SidStart        = source->SidStart;
  271. }
  272.  
  273. #if defined( _DEBUG )
  274.  
  275. void CAccessDeniedEntry::Dump( CDumpContext& dump_context ) const
  276. {
  277.    dump_context << " a CAccessDeniedEntry at " << (void *) this << "\n";
  278.    dump_context << "{\n";
  279.    dump_context << "   Header.AceType = "  << Header.AceType  << "\n";
  280.    dump_context << "   Header.AceFlags = " << Header.AceFlags << "\n";
  281.    dump_context << "   Header.AceSize = "  << Header.AceSize  << "\n";
  282.    dump_context << "   Mask = "            << Mask            << "\n";
  283.    dump_context << "   SidStart = "        << SidStart        << "\n";
  284.    dump_context << "}\n";
  285. }
  286.  
  287. #endif // _DEBUG
  288.  
  289. void CAccessDeniedEntry::Empty( void )
  290. {
  291.    // ACE_HEADER
  292.    Header.AceType  = 0;
  293.    Header.AceFlags = 0;
  294.    Header.AceSize  = 0;
  295.  
  296.    // ACE_MASK
  297.    Mask            = 0;
  298.  
  299.    SidStart        = 0;
  300. }
  301.  
  302. CBitmapCoreHeader::CBitmapCoreHeader()
  303. {
  304.    Empty();
  305. }
  306.  
  307. CBitmapCoreHeader::CBitmapCoreHeader( const CBitmapCoreHeader& source )
  308. {
  309.    Empty();
  310.    Copy( source );
  311. }
  312.  
  313. CBitmapCoreHeader::CBitmapCoreHeader( const tagBITMAPCOREHEADER * source )
  314. {
  315.    Empty();
  316.    Copy( source );
  317. }
  318.  
  319. CBitmapCoreHeader::~CBitmapCoreHeader()
  320. {
  321.    Empty();
  322. }
  323.  
  324. void CBitmapCoreHeader::Copy( const CBitmapCoreHeader& source )
  325. {
  326.    Copy( (const CBitmapCoreHeader *) &source );
  327. }
  328.  
  329. void CBitmapCoreHeader::Copy( const tagBITMAPCOREHEADER * source )
  330. {
  331.    ASSERT( source != NULL );
  332.  
  333.    if ( source == NULL )
  334.    {
  335.       return;
  336.    }
  337.  
  338.    bcSize     = source->bcSize;
  339.    bcWidth    = source->bcWidth;
  340.    bcHeight   = source->bcHeight;
  341.    bcPlanes   = source->bcPlanes;
  342.    bcBitCount = source->bcBitCount;
  343. }
  344.  
  345. #if defined( _DEBUG )
  346.  
  347. void CBitmapCoreHeader::Dump( CDumpContext& dump_context ) const
  348. {
  349.    dump_context << " a CBitmapCoreHeader at " << (void *) this << "\n";
  350.    dump_context << "{\n";
  351.    dump_context << "   bcSize = "     << bcSize     << "\n";
  352.    dump_context << "   bcWidth = "    << bcWidth    << "\n";
  353.    dump_context << "   bcHeight = "   << bcHeight   << "\n";
  354.    dump_context << "   bcPlanes = "   << bcPlanes   << "\n";
  355.    dump_context << "   bcBitCount = " << bcBitCount << "\n";
  356.    dump_context << "}\n";
  357. }
  358.  
  359. #endif // _DEBUG
  360.  
  361. void CBitmapCoreHeader::Empty( void )
  362. {
  363.    bcSize     = sizeof( tagBITMAPCOREHEADER );
  364.    bcWidth    = 0;
  365.    bcHeight   = 0;
  366.    bcPlanes   = 0;
  367.    bcBitCount = 0;
  368. }
  369.  
  370. CBitmapFileHeader::CBitmapFileHeader()
  371. {
  372.    Empty();
  373. }
  374.  
  375. CBitmapFileHeader::CBitmapFileHeader( const CBitmapFileHeader& source )
  376. {
  377.    Empty();
  378.    Copy( source );
  379. }
  380.  
  381. CBitmapFileHeader::CBitmapFileHeader( const tagBITMAPFILEHEADER * source )
  382. {
  383.    Empty();
  384.    Copy( source );
  385. }
  386.  
  387. CBitmapFileHeader::~CBitmapFileHeader()
  388. {
  389.    Empty();
  390. }
  391.  
  392. void CBitmapFileHeader::Copy( const CBitmapFileHeader& source )
  393. {
  394.    Copy( (const tagBITMAPFILEHEADER *) &source );
  395. }
  396.  
  397. void CBitmapFileHeader::Copy( const tagBITMAPFILEHEADER * source )
  398. {
  399.    ASSERT( source != NULL );
  400.  
  401.    if ( source == NULL )
  402.    {
  403.       return;
  404.    }
  405.  
  406.    bfType      = source->bfType;
  407.    bfSize      = source->bfSize;
  408.    bfReserved1 = source->bfReserved1;
  409.    bfReserved2 = source->bfReserved2;
  410.    bfOffBits   = source->bfOffBits;
  411. }
  412.  
  413. #if defined( _DEBUG )
  414.  
  415. void CBitmapFileHeader::Dump( CDumpContext& dump_context ) const
  416. {
  417.    dump_context << " a CBitmapFileHeader at " << (void *) this << "\n";
  418.    dump_context << "{\n";
  419.    dump_context << "   bfType = "      << bfType      << "\n";
  420.    dump_context << "   bfSize = "      << bfSize      << "\n";
  421.    dump_context << "   bfReserved1 = " << bfReserved1 << "\n";
  422.    dump_context << "   bfReserved2 = " << bfReserved2 << "\n";
  423.    dump_context << "   bfOffBits = "   << bfOffBits   << "\n";
  424.    dump_context << "}\n";
  425. }
  426.  
  427. #endif // _DEBUG
  428.  
  429. void CBitmapFileHeader::Empty( void )
  430. {
  431.    bfType      = 'BM';
  432.    bfSize      = 0;
  433.    bfReserved1 = 0;
  434.    bfReserved2 = 0;
  435.    bfOffBits   = 0;
  436. }
  437.  
  438. /*
  439. ** CBitmapInfoHeader
  440. */
  441.  
  442. CBitmapInfoHeader::CBitmapInfoHeader()
  443. {
  444.    Empty();
  445. }
  446.  
  447. CBitmapInfoHeader::CBitmapInfoHeader( const CBitmapInfoHeader& source )
  448. {
  449.    Empty();
  450.    Copy( source );
  451. }
  452.  
  453. CBitmapInfoHeader::CBitmapInfoHeader( const tagBITMAPINFOHEADER * source )
  454. {
  455.    Empty();
  456.    Copy( source );
  457. }
  458.  
  459. CBitmapInfoHeader::~CBitmapInfoHeader()
  460. {
  461.    Empty();
  462. }
  463.  
  464. void CBitmapInfoHeader::Copy( const CBitmapInfoHeader& source )
  465. {
  466.    Copy( (const tagBITMAPINFOHEADER * ) &source );
  467. }
  468.  
  469. void CBitmapInfoHeader::Copy( const tagBITMAPINFOHEADER * source )
  470. {
  471.    ASSERT( source != NULL );
  472.  
  473.    if ( source == NULL )
  474.    {
  475.       return;
  476.    }
  477.  
  478.    biSize          = source->biSize;
  479.    biWidth         = source->biWidth;
  480.    biHeight        = source->biHeight;
  481.    biPlanes        = source->biPlanes;
  482.    biBitCount      = source->biBitCount;
  483.    biCompression   = source->biCompression;
  484.    biSizeImage     = source->biSizeImage;
  485.    biXPelsPerMeter = source->biXPelsPerMeter;
  486.    biYPelsPerMeter = source->biYPelsPerMeter;
  487.    biClrUsed       = source->biClrUsed;
  488.    biClrImportant  = source->biClrImportant;
  489. }
  490.  
  491. #if defined( _DEBUG )
  492.  
  493. void CBitmapInfoHeader::Dump( CDumpContext& dump_context ) const
  494. {
  495.    dump_context << " a CBitmapInfoHeader at " << (void *) this << "\n";
  496.    dump_context << "{\n";
  497.    dump_context << "   biSize = "          << biSize          << "\n";
  498.    dump_context << "   biWidth = "         << biWidth         << "\n";
  499.    dump_context << "   biHeight = "        << biHeight        << "\n";
  500.    dump_context << "   biPlanes = "        << biPlanes        << "\n";
  501.    dump_context << "   biBitCount = "      << biBitCount      << "\n";
  502.    dump_context << "   biCompression = "   << biCompression   << "\n";
  503.    dump_context << "   biSizeImage = "     << biSizeImage     << "\n";
  504.    dump_context << "   biXPelsPerMeter = " << biXPelsPerMeter << "\n";
  505.    dump_context << "   biYPelsPerMeter = " << biYPelsPerMeter << "\n";
  506.    dump_context << "   biClrUsed = "       << biClrUsed       << "\n";
  507.    dump_context << "   biClrImportant = "  << biClrImportant  << "\n";
  508.    dump_context << "}\n";
  509. }
  510.  
  511. #endif // _DEBUG
  512.  
  513. void CBitmapInfoHeader::Empty( void )
  514. {
  515.    biSize          = sizeof( tagBITMAPINFOHEADER );
  516.    biWidth         = 0;
  517.    biHeight        = 0;
  518.    biPlanes        = 0;
  519.    biBitCount      = 0;
  520.    biCompression   = 0;
  521.    biSizeImage     = 0;
  522.    biXPelsPerMeter = 0;
  523.    biYPelsPerMeter = 0;
  524.    biClrUsed       = 0;
  525.    biClrImportant  = 0;
  526. }
  527.  
  528. /*
  529. ** CColorAdjustment
  530. */
  531.  
  532. CColorAdjustment::CColorAdjustment()
  533. {
  534.    Empty();
  535. }
  536.  
  537. CColorAdjustment::CColorAdjustment( const CColorAdjustment& source )
  538. {
  539.    Empty();
  540.    Copy( source );
  541. }
  542.  
  543. CColorAdjustment::CColorAdjustment( const tagCOLORADJUSTMENT * source )
  544. {
  545.    Empty();
  546.    Copy( source );
  547. }
  548.  
  549. CColorAdjustment::~CColorAdjustment()
  550. {
  551.    Empty();
  552. }
  553.  
  554. void CColorAdjustment::Copy( const CColorAdjustment& source )
  555. {
  556.    Copy( (const tagCOLORADJUSTMENT *) &source );
  557. }
  558.  
  559. void CColorAdjustment::Copy( const tagCOLORADJUSTMENT * source )
  560. {
  561.    ASSERT( source != NULL );
  562.  
  563.    if ( source == NULL )
  564.    {
  565.       return;
  566.    }
  567.  
  568.    caSize            = source->caSize;
  569.    caFlags           = source->caFlags;
  570.    caIlluminantIndex = source->caIlluminantIndex;
  571.    caRedGamma        = source->caRedGamma;
  572.    caGreenGamma      = source->caGreenGamma;
  573.    caBlueGamma       = source->caBlueGamma;
  574.    caReferenceBlack  = source->caReferenceBlack;
  575.    caReferenceWhite  = source->caReferenceWhite;
  576.    caContrast        = source->caContrast;
  577.    caBrightness      = source->caBrightness;
  578.    caColorfulness    = source->caColorfulness;
  579.    caRedGreenTint    = source->caRedGreenTint;
  580. }
  581.  
  582. #if defined( _DEBUG )
  583.  
  584. void CColorAdjustment::Dump( CDumpContext& dump_context ) const
  585. {
  586.    dump_context << " a CColorAdjustment at " << (void *) this << "\n";
  587.    dump_context << "{\n";
  588.    dump_context << "   caSize = "             << caSize             << "\n";
  589.    dump_context << "   caFlags = "            << caFlags            << "\n";
  590.    dump_context << "   caIlluminantIndex = "  << caIlluminantIndex  << "\n";
  591.    dump_context << "   caRedGamma = "         << caRedGamma         << "\n";
  592.    dump_context << "   caGreenGamma = "       << caGreenGamma       << "\n";
  593.    dump_context << "   caBlueGamma = "        << caBlueGamma        << "\n";
  594.    dump_context << "   caReferenceBlack = "   << caReferenceBlack   << "\n";
  595.    dump_context << "   caReferenceWhite = "   << caReferenceWhite   << "\n";
  596.    dump_context << "   caContrast = "         << caContrast         << "\n";
  597.    dump_context << "   caBrightness = "       << caBrightness       << "\n";
  598.    dump_context << "   caColorfulness = "     << caColorfulness     << "\n";
  599.    dump_context << "   caRedGreenTint = "     << caRedGreenTint     << "\n";
  600.    dump_context << "}\n";
  601. }
  602.  
  603. #endif // _DEBUG
  604.  
  605. void CColorAdjustment::Empty( void )
  606. {
  607.    caSize            = sizeof( tagCOLORADJUSTMENT );
  608.    caFlags           = 0;
  609.    caIlluminantIndex = 0;
  610.    caRedGamma        = 0;
  611.    caGreenGamma      = 0;
  612.    caBlueGamma       = 0;
  613.    caReferenceBlack  = 0;
  614.    caReferenceWhite  = 0;
  615.    caContrast        = 0;
  616.    caBrightness      = 0;
  617.    caColorfulness    = 0;
  618.    caRedGreenTint    = 0;
  619. }
  620.  
  621. /*
  622. ** CMemoryStatus
  623. */
  624.  
  625. CMemoryStatus::CMemoryStatus()
  626. {
  627.    Empty();
  628. }
  629.  
  630. CMemoryStatus::CMemoryStatus( const CMemoryStatus& source )
  631. {
  632.    Empty();
  633.    Copy( source );
  634. }
  635.  
  636. CMemoryStatus::CMemoryStatus( const MEMORYSTATUS * source )
  637. {
  638.    Empty();
  639.    Copy( source );
  640. }
  641.  
  642. CMemoryStatus::~CMemoryStatus()
  643. {
  644.    Empty();
  645. }
  646.  
  647. void CMemoryStatus::Copy( const CMemoryStatus& source )
  648. {
  649.    Copy( (const MEMORYSTATUS *) &source );
  650. }
  651.  
  652. void CMemoryStatus::Copy( const MEMORYSTATUS * source )
  653. {
  654.    ASSERT( source != NULL );
  655.  
  656.    if ( source == NULL )
  657.    {
  658.       return;
  659.    }
  660.  
  661.    dwLength        = source->dwLength;
  662.    dwMemoryLoad    = source->dwMemoryLoad;
  663.    dwTotalPhys     = source->dwTotalPhys;
  664.    dwAvailPhys     = source->dwAvailPhys;
  665.    dwTotalPageFile = source->dwTotalPageFile;
  666.    dwAvailPageFile = source->dwAvailPageFile;
  667.    dwTotalVirtual  = source->dwTotalVirtual;
  668.    dwAvailVirtual  = source->dwAvailVirtual;
  669. }
  670.  
  671. #if defined( _DEBUG )
  672.  
  673. void CMemoryStatus::Dump( CDumpContext& dump_context ) const
  674. {
  675.    dump_context << " a CMemoryStatus at " << (void *) this << "\n";
  676.    dump_context << "{\n";
  677.    dump_context << "   dwLength        = " << dwLength        << "\n";
  678.    dump_context << "   dwMemoryLoad    = " << dwMemoryLoad    << "\n";
  679.    dump_context << "   dwTotalPhys     = " << dwTotalPhys     << "\n";
  680.    dump_context << "   dwAvailPhys     = " << dwAvailPhys     << "\n";
  681.    dump_context << "   dwTotalPageFile = " << dwTotalPageFile << "\n";
  682.    dump_context << "   dwAvailPageFile = " << dwAvailPageFile << "\n";
  683.    dump_context << "   dwTotalVirtual  = " << dwTotalVirtual  << "\n";
  684.    dump_context << "   dwAvailVirtual  = " << dwAvailVirtual  << "\n";
  685.    dump_context << "}\n";
  686. }
  687.  
  688. #endif // _DEBUG
  689.  
  690. void CMemoryStatus::Empty( void )
  691. {
  692.    dwLength        = sizeof( MEMORYSTATUS );
  693.    dwMemoryLoad    = 0;
  694.    dwTotalPhys     = 0;
  695.    dwAvailPhys     = 0;
  696.    dwTotalPageFile = 0;
  697.    dwAvailPageFile = 0;
  698.    dwTotalVirtual  = 0;
  699.    dwAvailVirtual  = 0;
  700. }
  701.  
  702. /*
  703. ** COFStruct
  704. */
  705.  
  706. COFStruct::COFStruct()
  707. {
  708.    Empty();
  709. }
  710.  
  711. COFStruct::COFStruct( const COFStruct& source )
  712. {
  713.    Empty();
  714.    Copy( source );
  715. }
  716.  
  717. COFStruct::COFStruct( const _OFSTRUCT * source )
  718. {
  719.    Empty();
  720.    Copy( source );
  721. }
  722.  
  723. COFStruct::~COFStruct()
  724. {
  725.    Empty();
  726. }
  727.  
  728. void COFStruct::Copy( const COFStruct& source )
  729. {
  730.    Copy( (const _OFSTRUCT *) &source );
  731. }
  732.  
  733. void COFStruct::Copy( const _OFSTRUCT * source )
  734. {
  735.    ASSERT( source != NULL );
  736.  
  737.    if ( source == NULL )
  738.    {
  739.       return;
  740.    }
  741.  
  742.    cBytes     = source->cBytes;
  743.    fFixedDisk = source->fFixedDisk;
  744.    nErrCode   = source->nErrCode;
  745.    Reserved1  = source->Reserved1;
  746.    Reserved2  = source->Reserved2;
  747.    ::strcpy( szPathName, source->szPathName );
  748. }
  749.  
  750. #if defined( _DEBUG )
  751.  
  752. void COFStruct::Dump( CDumpContext& dump_context ) const
  753. {
  754.    dump_context << " a COFStruct at " << (void *) this << "\n";
  755.    dump_context << "{\n";
  756.    dump_context << "   cBytes     = "  << cBytes      << "\n";
  757.    dump_context << "   fFixedDisk = "  << fFixedDisk  << "\n";
  758.    dump_context << "   nErrCode   = "  << nErrCode    << "\n";
  759.    dump_context << "   Reserved1  = "   << Reserved1  << "\n";
  760.    dump_context << "   Reserved2  = "   << Reserved2  << "\n";
  761.    dump_context << "   szPathName = \"" << szPathName << "\"\n";
  762.    dump_context << "}\n";
  763. }
  764.  
  765. #endif // _DEBUG
  766.  
  767. void COFStruct::Empty( void )
  768. {
  769.    cBytes     = sizeof( _OFSTRUCT );
  770.    fFixedDisk = 0;
  771.    nErrCode   = 0;
  772.    Reserved1  = 0;
  773.    Reserved2  = 0;
  774.  
  775.    int index = 0;
  776.  
  777.    while( index < OFS_MAXPATHNAME )
  778.    {
  779.       szPathName[ index ] = 0;
  780.       index++;
  781.    }
  782. }
  783.  
  784. /*
  785. ** COutlineTextMetricA
  786. */
  787.  
  788. COutlineTextMetricA::COutlineTextMetricA()
  789. {
  790.    Empty();
  791. }
  792.  
  793. COutlineTextMetricA::COutlineTextMetricA( const COutlineTextMetricA& source )
  794. {
  795.    Empty();
  796.    Copy( source );
  797. }
  798.  
  799. COutlineTextMetricA::COutlineTextMetricA( const _OUTLINETEXTMETRICA * source )
  800. {
  801.    Empty();
  802.    Copy( source );
  803. }
  804.  
  805. COutlineTextMetricA::~COutlineTextMetricA()
  806. {
  807.    Empty();
  808. }
  809.  
  810. void COutlineTextMetricA::Copy( const COutlineTextMetricA& source )
  811. {
  812.    Copy( (const _OUTLINETEXTMETRICA *) &source );
  813. }
  814.  
  815. void COutlineTextMetricA::Copy( const _OUTLINETEXTMETRICA * source )
  816. {
  817.    ASSERT( source != NULL );
  818.  
  819.    if ( source == NULL )
  820.    {
  821.       return;
  822.    }
  823.  
  824.    otmSize = source->otmSize;
  825.  
  826.    // TEXTMETRICA
  827.    otmTextMetrics.tmHeight           = source->otmTextMetrics.tmHeight;
  828.    otmTextMetrics.tmAscent           = source->otmTextMetrics.tmAscent;
  829.    otmTextMetrics.tmDescent          = source->otmTextMetrics.tmDescent;
  830.    otmTextMetrics.tmInternalLeading  = source->otmTextMetrics.tmInternalLeading;
  831.    otmTextMetrics.tmExternalLeading  = source->otmTextMetrics.tmExternalLeading;
  832.    otmTextMetrics.tmAveCharWidth     = source->otmTextMetrics.tmAveCharWidth;
  833.    otmTextMetrics.tmMaxCharWidth     = source->otmTextMetrics.tmMaxCharWidth;
  834.    otmTextMetrics.tmWeight           = source->otmTextMetrics.tmWeight;
  835.    otmTextMetrics.tmOverhang         = source->otmTextMetrics.tmOverhang;
  836.    otmTextMetrics.tmDigitizedAspectX = source->otmTextMetrics.tmDigitizedAspectX;
  837.    otmTextMetrics.tmDigitizedAspectY = source->otmTextMetrics.tmDigitizedAspectY;
  838.    otmTextMetrics.tmFirstChar        = source->otmTextMetrics.tmFirstChar;
  839.    otmTextMetrics.tmLastChar         = source->otmTextMetrics.tmLastChar;
  840.    otmTextMetrics.tmDefaultChar      = source->otmTextMetrics.tmDefaultChar;
  841.    otmTextMetrics.tmBreakChar        = source->otmTextMetrics.tmBreakChar;
  842.    otmTextMetrics.tmItalic           = source->otmTextMetrics.tmItalic;
  843.    otmTextMetrics.tmUnderlined       = source->otmTextMetrics.tmUnderlined;
  844.    otmTextMetrics.tmStruckOut        = source->otmTextMetrics.tmStruckOut;
  845.    otmTextMetrics.tmPitchAndFamily   = source->otmTextMetrics.tmPitchAndFamily;
  846.    otmTextMetrics.tmCharSet          = source->otmTextMetrics.tmCharSet;
  847.    
  848.    otmFiller = source->otmFiller;
  849.    
  850.    // PANOSE
  851.    otmPanoseNumber.bFamilyType      = source->otmPanoseNumber.bFamilyType;
  852.    otmPanoseNumber.bSerifStyle      = source->otmPanoseNumber.bSerifStyle;
  853.    otmPanoseNumber.bWeight          = source->otmPanoseNumber.bWeight;
  854.    otmPanoseNumber.bProportion      = source->otmPanoseNumber.bProportion;
  855.    otmPanoseNumber.bContrast        = source->otmPanoseNumber.bContrast;
  856.    otmPanoseNumber.bStrokeVariation = source->otmPanoseNumber.bStrokeVariation;
  857.    otmPanoseNumber.bArmStyle        = source->otmPanoseNumber.bArmStyle;
  858.    otmPanoseNumber.bLetterform      = source->otmPanoseNumber.bLetterform;
  859.    otmPanoseNumber.bMidline         = source->otmPanoseNumber.bMidline;
  860.    otmPanoseNumber.bXHeight         = source->otmPanoseNumber.bXHeight;
  861.  
  862.    otmfsSelection    = source->otmfsSelection;
  863.    otmfsType         = source->otmfsType;
  864.    otmsCharSlopeRise = source->otmsCharSlopeRise;
  865.    otmsCharSlopeRun  = source->otmsCharSlopeRun;
  866.    otmItalicAngle    = source->otmItalicAngle;
  867.    otmEMSquare       = source->otmEMSquare;
  868.    otmAscent         = source->otmAscent;
  869.    otmDescent        = source->otmDescent;
  870.    otmLineGap        = source->otmLineGap;
  871.    otmsCapEmHeight   = source->otmsCapEmHeight;
  872.    otmsXHeight       = source->otmsXHeight;
  873.    
  874.    // RECT
  875.    otmrcFontBox.left   = source->otmrcFontBox.left;
  876.    otmrcFontBox.top    = source->otmrcFontBox.top;
  877.    otmrcFontBox.right  = source->otmrcFontBox.right;
  878.    otmrcFontBox.bottom = source->otmrcFontBox.bottom;
  879.  
  880.    otmMacAscent     = source->otmMacAscent;
  881.    otmMacDescent    = source->otmMacDescent;
  882.    otmMacLineGap    = source->otmMacLineGap;
  883.    otmusMinimumPPEM = source->otmusMinimumPPEM;
  884.  
  885.    // POINT
  886.    otmptSubscriptSize.x     = source->otmptSubscriptSize.x;
  887.    otmptSubscriptSize.y     = source->otmptSubscriptSize.y;
  888.    otmptSubscriptOffset.x   = source->otmptSubscriptOffset.x;
  889.    otmptSubscriptOffset.y   = source->otmptSubscriptOffset.y;
  890.    otmptSuperscriptSize.x   = source->otmptSuperscriptSize.x;
  891.    otmptSuperscriptSize.y   = source->otmptSuperscriptSize.y;
  892.    otmptSuperscriptOffset.x = source->otmptSuperscriptOffset.x;
  893.    otmptSuperscriptOffset.y = source->otmptSuperscriptOffset.y;
  894.  
  895.    otmsStrikeoutSize      = source->otmsStrikeoutSize;
  896.    otmsStrikeoutPosition  = source->otmsStrikeoutPosition;
  897.    otmsUnderscoreSize     = source->otmsUnderscoreSize;
  898.    otmsUnderscorePosition = source->otmsUnderscorePosition;
  899.    otmpFamilyName         = source->otmpFamilyName;
  900.    otmpFaceName           = source->otmpFaceName;
  901.    otmpStyleName          = source->otmpStyleName;
  902.    otmpFullName           = source->otmpFullName;
  903. }
  904.  
  905. #if defined( _DEBUG )
  906.  
  907. void COutlineTextMetricA::Dump( CDumpContext& dump_context ) const
  908. {
  909.    dump_context << " a COutlineTextMetricA at " << (void *) this << "\n";
  910.    dump_context << "{\n";
  911.    dump_context << "   otmSize                           = " << otmSize                           << "\n";
  912.    dump_context << "   otmTextMetrics.tmHeight           = " << otmTextMetrics.tmHeight           << "\n";
  913.    dump_context << "   otmTextMetrics.tmAscent           = " << otmTextMetrics.tmAscent           << "\n";
  914.    dump_context << "   otmTextMetrics.tmDescent          = " << otmTextMetrics.tmDescent          << "\n";
  915.    dump_context << "   otmTextMetrics.tmInternalLeading  = " << otmTextMetrics.tmInternalLeading  << "\n";
  916.    dump_context << "   otmTextMetrics.tmExternalLeading  = " << otmTextMetrics.tmExternalLeading  << "\n";
  917.    dump_context << "   otmTextMetrics.tmAveCharWidth     = " << otmTextMetrics.tmAveCharWidth     << "\n";
  918.    dump_context << "   otmTextMetrics.tmMaxCharWidth     = " << otmTextMetrics.tmMaxCharWidth     << "\n";
  919.    dump_context << "   otmTextMetrics.tmWeight           = " << otmTextMetrics.tmWeight           << "\n";
  920.    dump_context << "   otmTextMetrics.tmOverhang         = " << otmTextMetrics.tmOverhang         << "\n";
  921.    dump_context << "   otmTextMetrics.tmDigitizedAspectX = " << otmTextMetrics.tmDigitizedAspectX << "\n";
  922.    dump_context << "   otmTextMetrics.tmDigitizedAspectY = " << otmTextMetrics.tmDigitizedAspectY << "\n";
  923.    dump_context << "   otmTextMetrics.tmFirstChar        = " << otmTextMetrics.tmFirstChar        << "\n";
  924.    dump_context << "   otmTextMetrics.tmLastChar         = " << otmTextMetrics.tmLastChar         << "\n";
  925.    dump_context << "   otmTextMetrics.tmDefaultChar      = " << otmTextMetrics.tmDefaultChar      << "\n";
  926.    dump_context << "   otmTextMetrics.tmBreakChar        = " << otmTextMetrics.tmBreakChar        << "\n";
  927.    dump_context << "   otmTextMetrics.tmItalic           = " << otmTextMetrics.tmItalic           << "\n";
  928.    dump_context << "   otmTextMetrics.tmUnderlined       = " << otmTextMetrics.tmUnderlined       << "\n";
  929.    dump_context << "   otmTextMetrics.tmStruckOut        = " << otmTextMetrics.tmStruckOut        << "\n";
  930.    dump_context << "   otmTextMetrics.tmPitchAndFamily   = " << otmTextMetrics.tmPitchAndFamily   << "\n";
  931.    dump_context << "   otmTextMetrics.tmCharSet          = " << otmTextMetrics.tmCharSet          << "\n";
  932.    dump_context << "   otmFiller                         = " << otmFiller                         << "\n";
  933.    dump_context << "   otmPanoseNumber.bFamilyType       = " << otmPanoseNumber.bFamilyType       << "\n";
  934.    dump_context << "   otmPanoseNumber.bSerifStyle       = " << otmPanoseNumber.bSerifStyle       << "\n";
  935.    dump_context << "   otmPanoseNumber.bWeight           = " << otmPanoseNumber.bWeight           << "\n";
  936.    dump_context << "   otmPanoseNumber.bProportion       = " << otmPanoseNumber.bProportion       << "\n";
  937.    dump_context << "   otmPanoseNumber.bContrast         = " << otmPanoseNumber.bContrast         << "\n";
  938.    dump_context << "   otmPanoseNumber.bStrokeVariation  = " << otmPanoseNumber.bStrokeVariation  << "\n";
  939.    dump_context << "   otmPanoseNumber.bArmStyle         = " << otmPanoseNumber.bArmStyle         << "\n";
  940.    dump_context << "   otmPanoseNumber.bLetterform       = " << otmPanoseNumber.bLetterform       << "\n";
  941.    dump_context << "   otmPanoseNumber.bMidline          = " << otmPanoseNumber.bMidline          << "\n";
  942.    dump_context << "   otmPanoseNumber.bXHeight          = " << otmPanoseNumber.bXHeight          << "\n";
  943.    dump_context << "   otmfsSelection                    = " << otmfsSelection                    << "\n";
  944.    dump_context << "   otmfsType                         = " << otmfsType                         << "\n";
  945.    dump_context << "   otmsCharSlopeRise                 = " << otmsCharSlopeRise                 << "\n";
  946.    dump_context << "   otmsCharSlopeRun                  = " << otmsCharSlopeRun                  << "\n";
  947.    dump_context << "   otmItalicAngle                    = " << otmItalicAngle                    << "\n";
  948.    dump_context << "   otmEMSquare                       = " << otmEMSquare                       << "\n";
  949.    dump_context << "   otmAscent                         = " << otmAscent                         << "\n";
  950.    dump_context << "   otmDescent                        = " << otmDescent                        << "\n";
  951.    dump_context << "   otmLineGap                        = " << otmLineGap                        << "\n";
  952.    dump_context << "   otmsCapEmHeight                   = " << otmsCapEmHeight                   << "\n";
  953.    dump_context << "   otmsXHeight                       = " << otmsXHeight                       << "\n";
  954.    dump_context << "   otmrcFontBox.left                 = " << otmrcFontBox.left                 << "\n";
  955.    dump_context << "   otmrcFontBox.top                  = " << otmrcFontBox.top                  << "\n";
  956.    dump_context << "   otmrcFontBox.right                = " << otmrcFontBox.right                << "\n";
  957.    dump_context << "   otmrcFontBox.bottom               = " << otmrcFontBox.bottom               << "\n";
  958.    dump_context << "   otmMacAscent                      = " << otmMacAscent                      << "\n";
  959.    dump_context << "   otmMacDescent                     = " << otmMacDescent                     << "\n";
  960.    dump_context << "   otmMacLineGap                     = " << otmMacLineGap                     << "\n";
  961.    dump_context << "   otmusMinimumPPEM                  = " << otmusMinimumPPEM                  << "\n";
  962.    dump_context << "   otmptSubscriptSize.x              = " << otmptSubscriptSize.x              << "\n";
  963.    dump_context << "   otmptSubscriptSize.y              = " << otmptSubscriptSize.y              << "\n";
  964.    dump_context << "   otmptSubscriptOffset.x            = " << otmptSubscriptOffset.x            << "\n";
  965.    dump_context << "   otmptSubscriptOffset.y            = " << otmptSubscriptOffset.y            << "\n";
  966.    dump_context << "   otmptSuperscriptSize.x            = " << otmptSuperscriptSize.x            << "\n";
  967.    dump_context << "   otmptSuperscriptSize.y            = " << otmptSuperscriptSize.y            << "\n";
  968.    dump_context << "   otmptSuperscriptOffset.x          = " << otmptSuperscriptOffset.x          << "\n";
  969.    dump_context << "   otmptSuperscriptOffset.y          = " << otmptSuperscriptOffset.y          << "\n";
  970.    dump_context << "   otmsStrikeoutSize                 = " << otmsStrikeoutSize                 << "\n";
  971.    dump_context << "   otmsStrikeoutPosition             = " << otmsStrikeoutPosition             << "\n";
  972.    dump_context << "   otmsUnderscoreSize                = " << otmsUnderscoreSize                << "\n";
  973.    dump_context << "   otmsUnderscorePosition            = " << otmsUnderscorePosition            << "\n";
  974.    dump_context << "   otmpFamilyName                    = " << otmpFamilyName                    << "\n";
  975.    dump_context << "   otmpFaceName                      = " << otmpFaceName                      << "\n";
  976.    dump_context << "   otmpStyleName                     = " << otmpStyleName                     << "\n";
  977.    dump_context << "   otmpFullName                      = " << otmpFullName                      << "\n";
  978.    dump_context << "}\n";
  979. }
  980.  
  981. #endif // _DEBUG
  982.  
  983. void COutlineTextMetricA::Empty( void )
  984. {
  985.    otmSize = sizeof( _OUTLINETEXTMETRICA );
  986.  
  987.    // TEXTMETRICA
  988.    otmTextMetrics.tmHeight           = 0;
  989.    otmTextMetrics.tmAscent           = 0;
  990.    otmTextMetrics.tmDescent          = 0;
  991.    otmTextMetrics.tmInternalLeading  = 0;
  992.    otmTextMetrics.tmExternalLeading  = 0;
  993.    otmTextMetrics.tmAveCharWidth     = 0;
  994.    otmTextMetrics.tmMaxCharWidth     = 0;
  995.    otmTextMetrics.tmWeight           = 0;
  996.    otmTextMetrics.tmOverhang         = 0;
  997.    otmTextMetrics.tmDigitizedAspectX = 0;
  998.    otmTextMetrics.tmDigitizedAspectY = 0;
  999.    otmTextMetrics.tmFirstChar        = 0;
  1000.    otmTextMetrics.tmLastChar         = 0;
  1001.    otmTextMetrics.tmDefaultChar      = 0;
  1002.    otmTextMetrics.tmBreakChar        = 0;
  1003.    otmTextMetrics.tmItalic           = 0;
  1004.    otmTextMetrics.tmUnderlined       = 0;
  1005.    otmTextMetrics.tmStruckOut        = 0;
  1006.    otmTextMetrics.tmPitchAndFamily   = 0;
  1007.    otmTextMetrics.tmCharSet          = 0;
  1008.    
  1009.    otmFiller = 0;
  1010.    
  1011.    // PANOSE
  1012.    otmPanoseNumber.bFamilyType      = 0;
  1013.    otmPanoseNumber.bSerifStyle      = 0;
  1014.    otmPanoseNumber.bWeight          = 0;
  1015.    otmPanoseNumber.bProportion      = 0;
  1016.    otmPanoseNumber.bContrast        = 0;
  1017.    otmPanoseNumber.bStrokeVariation = 0;
  1018.    otmPanoseNumber.bArmStyle        = 0;
  1019.    otmPanoseNumber.bLetterform      = 0;
  1020.    otmPanoseNumber.bMidline         = 0;
  1021.    otmPanoseNumber.bXHeight         = 0;
  1022.  
  1023.    otmfsSelection    = 0;
  1024.    otmfsType         = 0;
  1025.    otmsCharSlopeRise = 0;
  1026.    otmsCharSlopeRun  = 0;
  1027.    otmItalicAngle    = 0;
  1028.    otmEMSquare       = 0;
  1029.    otmAscent         = 0;
  1030.    otmDescent        = 0;
  1031.    otmLineGap        = 0;
  1032.    otmsCapEmHeight   = 0;
  1033.    otmsXHeight       = 0;
  1034.    
  1035.    // RECT
  1036.    otmrcFontBox.left   = 0;
  1037.    otmrcFontBox.top    = 0;
  1038.    otmrcFontBox.right  = 0;
  1039.    otmrcFontBox.bottom = 0;
  1040.  
  1041.    otmMacAscent     = 0;
  1042.    otmMacDescent    = 0;
  1043.    otmMacLineGap    = 0;
  1044.    otmusMinimumPPEM = 0;
  1045.  
  1046.    // POINT
  1047.    otmptSubscriptSize.x     = 0;
  1048.    otmptSubscriptSize.y     = 0;
  1049.    otmptSubscriptOffset.x   = 0;
  1050.    otmptSubscriptOffset.y   = 0;
  1051.    otmptSuperscriptSize.x   = 0;
  1052.    otmptSuperscriptSize.y   = 0;
  1053.    otmptSuperscriptOffset.x = 0;
  1054.    otmptSuperscriptOffset.y = 0;
  1055.  
  1056.    otmsStrikeoutSize      = 0;
  1057.    otmsStrikeoutPosition  = 0;
  1058.    otmsUnderscoreSize     = 0;
  1059.    otmsUnderscorePosition = 0;
  1060.    otmpFamilyName         = NULL;
  1061.    otmpFaceName           = NULL;
  1062.    otmpStyleName          = NULL;
  1063.    otmpFullName           = NULL;
  1064. }
  1065.  
  1066. COutlineTextMetricW::COutlineTextMetricW()
  1067. {
  1068.    Empty();
  1069. }
  1070.  
  1071. COutlineTextMetricW::COutlineTextMetricW( const COutlineTextMetricW& source )
  1072. {
  1073.    Empty();
  1074.    Copy( source );
  1075. }
  1076.  
  1077. COutlineTextMetricW::COutlineTextMetricW( const _OUTLINETEXTMETRICW * source )
  1078. {
  1079.    Empty();
  1080.    Copy( source );
  1081. }
  1082.  
  1083. COutlineTextMetricW::~COutlineTextMetricW()
  1084. {
  1085.    Empty();
  1086. }
  1087.  
  1088. void COutlineTextMetricW::Copy( const COutlineTextMetricW& source )
  1089. {
  1090.    Copy( (const _OUTLINETEXTMETRICW *) &source );
  1091. }
  1092.  
  1093. void COutlineTextMetricW::Copy( const _OUTLINETEXTMETRICW * source )
  1094. {
  1095.    ASSERT( source != NULL );
  1096.  
  1097.    if ( source == NULL )
  1098.    {
  1099.       return;
  1100.    }
  1101.  
  1102.    otmSize = source->otmSize;
  1103.  
  1104.    // TEXTMETRICA
  1105.    otmTextMetrics.tmHeight           = source->otmTextMetrics.tmHeight;
  1106.    otmTextMetrics.tmAscent           = source->otmTextMetrics.tmAscent;
  1107.    otmTextMetrics.tmDescent          = source->otmTextMetrics.tmDescent;
  1108.    otmTextMetrics.tmInternalLeading  = source->otmTextMetrics.tmInternalLeading;
  1109.    otmTextMetrics.tmExternalLeading  = source->otmTextMetrics.tmExternalLeading;
  1110.    otmTextMetrics.tmAveCharWidth     = source->otmTextMetrics.tmAveCharWidth;
  1111.    otmTextMetrics.tmMaxCharWidth     = source->otmTextMetrics.tmMaxCharWidth;
  1112.    otmTextMetrics.tmWeight           = source->otmTextMetrics.tmWeight;
  1113.    otmTextMetrics.tmOverhang         = source->otmTextMetrics.tmOverhang;
  1114.    otmTextMetrics.tmDigitizedAspectX = source->otmTextMetrics.tmDigitizedAspectX;
  1115.    otmTextMetrics.tmDigitizedAspectY = source->otmTextMetrics.tmDigitizedAspectY;
  1116.    otmTextMetrics.tmFirstChar        = source->otmTextMetrics.tmFirstChar;
  1117.    otmTextMetrics.tmLastChar         = source->otmTextMetrics.tmLastChar;
  1118.    otmTextMetrics.tmDefaultChar      = source->otmTextMetrics.tmDefaultChar;
  1119.    otmTextMetrics.tmBreakChar        = source->otmTextMetrics.tmBreakChar;
  1120.    otmTextMetrics.tmItalic           = source->otmTextMetrics.tmItalic;
  1121.    otmTextMetrics.tmUnderlined       = source->otmTextMetrics.tmUnderlined;
  1122.    otmTextMetrics.tmStruckOut        = source->otmTextMetrics.tmStruckOut;
  1123.    otmTextMetrics.tmPitchAndFamily   = source->otmTextMetrics.tmPitchAndFamily;
  1124.    otmTextMetrics.tmCharSet          = source->otmTextMetrics.tmCharSet;
  1125.    
  1126.    otmFiller = source->otmFiller;
  1127.    
  1128.    // PANOSE
  1129.    otmPanoseNumber.bFamilyType      = source->otmPanoseNumber.bFamilyType;
  1130.    otmPanoseNumber.bSerifStyle      = source->otmPanoseNumber.bSerifStyle;
  1131.    otmPanoseNumber.bWeight          = source->otmPanoseNumber.bWeight;
  1132.    otmPanoseNumber.bProportion      = source->otmPanoseNumber.bProportion;
  1133.    otmPanoseNumber.bContrast        = source->otmPanoseNumber.bContrast;
  1134.    otmPanoseNumber.bStrokeVariation = source->otmPanoseNumber.bStrokeVariation;
  1135.    otmPanoseNumber.bArmStyle        = source->otmPanoseNumber.bArmStyle;
  1136.    otmPanoseNumber.bLetterform      = source->otmPanoseNumber.bLetterform;
  1137.    otmPanoseNumber.bMidline         = source->otmPanoseNumber.bMidline;
  1138.    otmPanoseNumber.bXHeight         = source->otmPanoseNumber.bXHeight;
  1139.  
  1140.    otmfsSelection    = source->otmfsSelection;
  1141.    otmfsType         = source->otmfsType;
  1142.    otmsCharSlopeRise = source->otmsCharSlopeRise;
  1143.    otmsCharSlopeRun  = source->otmsCharSlopeRun;
  1144.    otmItalicAngle    = source->otmItalicAngle;
  1145.    otmEMSquare       = source->otmEMSquare;
  1146.    otmAscent         = source->otmAscent;
  1147.    otmDescent        = source->otmDescent;
  1148.    otmLineGap        = source->otmLineGap;
  1149.    otmsCapEmHeight   = source->otmsCapEmHeight;
  1150.    otmsXHeight       = source->otmsXHeight;
  1151.    
  1152.    // RECT
  1153.    otmrcFontBox.left   = source->otmrcFontBox.left;
  1154.    otmrcFontBox.top    = source->otmrcFontBox.top;
  1155.    otmrcFontBox.right  = source->otmrcFontBox.right;
  1156.    otmrcFontBox.bottom = source->otmrcFontBox.bottom;
  1157.  
  1158.    otmMacAscent     = source->otmMacAscent;
  1159.    otmMacDescent    = source->otmMacDescent;
  1160.    otmMacLineGap    = source->otmMacLineGap;
  1161.    otmusMinimumPPEM = source->otmusMinimumPPEM;
  1162.  
  1163.    // POINT
  1164.    otmptSubscriptSize.x     = source->otmptSubscriptSize.x;
  1165.    otmptSubscriptSize.y     = source->otmptSubscriptSize.y;
  1166.    otmptSubscriptOffset.x   = source->otmptSubscriptOffset.x;
  1167.    otmptSubscriptOffset.y   = source->otmptSubscriptOffset.y;
  1168.    otmptSuperscriptSize.x   = source->otmptSuperscriptSize.x;
  1169.    otmptSuperscriptSize.y   = source->otmptSuperscriptSize.y;
  1170.    otmptSuperscriptOffset.x = source->otmptSuperscriptOffset.x;
  1171.    otmptSuperscriptOffset.y = source->otmptSuperscriptOffset.y;
  1172.  
  1173.    otmsStrikeoutSize      = source->otmsStrikeoutSize;
  1174.    otmsStrikeoutPosition  = source->otmsStrikeoutPosition;
  1175.    otmsUnderscoreSize     = source->otmsUnderscoreSize;
  1176.    otmsUnderscorePosition = source->otmsUnderscorePosition;
  1177.    otmpFamilyName         = source->otmpFamilyName;
  1178.    otmpFaceName           = source->otmpFaceName;
  1179.    otmpStyleName          = source->otmpStyleName;
  1180.    otmpFullName           = source->otmpFullName;
  1181. }
  1182.  
  1183. #if defined( _DEBUG )
  1184.  
  1185. void COutlineTextMetricW::Dump( CDumpContext& dump_context ) const
  1186. {
  1187.    dump_context << " a COutlineTextMetricW at " << (void *) this << "\n";
  1188.    dump_context << "{\n";
  1189.    dump_context << "   otmSize                           = " << otmSize                           << "\n";
  1190.    dump_context << "   otmTextMetrics.tmHeight           = " << otmTextMetrics.tmHeight           << "\n";
  1191.    dump_context << "   otmTextMetrics.tmAscent           = " << otmTextMetrics.tmAscent           << "\n";
  1192.    dump_context << "   otmTextMetrics.tmDescent          = " << otmTextMetrics.tmDescent          << "\n";
  1193.    dump_context << "   otmTextMetrics.tmInternalLeading  = " << otmTextMetrics.tmInternalLeading  << "\n";
  1194.    dump_context << "   otmTextMetrics.tmExternalLeading  = " << otmTextMetrics.tmExternalLeading  << "\n";
  1195.    dump_context << "   otmTextMetrics.tmAveCharWidth     = " << otmTextMetrics.tmAveCharWidth     << "\n";
  1196.    dump_context << "   otmTextMetrics.tmMaxCharWidth     = " << otmTextMetrics.tmMaxCharWidth     << "\n";
  1197.    dump_context << "   otmTextMetrics.tmWeight           = " << otmTextMetrics.tmWeight           << "\n";
  1198.    dump_context << "   otmTextMetrics.tmOverhang         = " << otmTextMetrics.tmOverhang         << "\n";
  1199.    dump_context << "   otmTextMetrics.tmDigitizedAspectX = " << otmTextMetrics.tmDigitizedAspectX << "\n";
  1200.    dump_context << "   otmTextMetrics.tmDigitizedAspectY = " << otmTextMetrics.tmDigitizedAspectY << "\n";
  1201.    dump_context << "   otmTextMetrics.tmFirstChar        = " << otmTextMetrics.tmFirstChar        << "\n";
  1202.    dump_context << "   otmTextMetrics.tmLastChar         = " << otmTextMetrics.tmLastChar         << "\n";
  1203.    dump_context << "   otmTextMetrics.tmDefaultChar      = " << otmTextMetrics.tmDefaultChar      << "\n";
  1204.    dump_context << "   otmTextMetrics.tmBreakChar        = " << otmTextMetrics.tmBreakChar        << "\n";
  1205.    dump_context << "   otmTextMetrics.tmItalic           = " << otmTextMetrics.tmItalic           << "\n";
  1206.    dump_context << "   otmTextMetrics.tmUnderlined       = " << otmTextMetrics.tmUnderlined       << "\n";
  1207.    dump_context << "   otmTextMetrics.tmStruckOut        = " << otmTextMetrics.tmStruckOut        << "\n";
  1208.    dump_context << "   otmTextMetrics.tmPitchAndFamily   = " << otmTextMetrics.tmPitchAndFamily   << "\n";
  1209.    dump_context << "   otmTextMetrics.tmCharSet          = " << otmTextMetrics.tmCharSet          << "\n";
  1210.    dump_context << "   otmFiller                         = " << otmFiller                         << "\n";
  1211.    dump_context << "   otmPanoseNumber.bFamilyType       = " << otmPanoseNumber.bFamilyType       << "\n";
  1212.    dump_context << "   otmPanoseNumber.bSerifStyle       = " << otmPanoseNumber.bSerifStyle       << "\n";
  1213.    dump_context << "   otmPanoseNumber.bWeight           = " << otmPanoseNumber.bWeight           << "\n";
  1214.    dump_context << "   otmPanoseNumber.bProportion       = " << otmPanoseNumber.bProportion       << "\n";
  1215.    dump_context << "   otmPanoseNumber.bContrast         = " << otmPanoseNumber.bContrast         << "\n";
  1216.    dump_context << "   otmPanoseNumber.bStrokeVariation  = " << otmPanoseNumber.bStrokeVariation  << "\n";
  1217.    dump_context << "   otmPanoseNumber.bArmStyle         = " << otmPanoseNumber.bArmStyle         << "\n";
  1218.    dump_context << "   otmPanoseNumber.bLetterform       = " << otmPanoseNumber.bLetterform       << "\n";
  1219.    dump_context << "   otmPanoseNumber.bMidline          = " << otmPanoseNumber.bMidline          << "\n";
  1220.    dump_context << "   otmPanoseNumber.bXHeight          = " << otmPanoseNumber.bXHeight          << "\n";
  1221.    dump_context << "   otmfsSelection                    = " << otmfsSelection                    << "\n";
  1222.    dump_context << "   otmfsType                         = " << otmfsType                         << "\n";
  1223.    dump_context << "   otmsCharSlopeRise                 = " << otmsCharSlopeRise                 << "\n";
  1224.    dump_context << "   otmsCharSlopeRun                  = " << otmsCharSlopeRun                  << "\n";
  1225.    dump_context << "   otmItalicAngle                    = " << otmItalicAngle                    << "\n";
  1226.    dump_context << "   otmEMSquare                       = " << otmEMSquare                       << "\n";
  1227.    dump_context << "   otmAscent                         = " << otmAscent                         << "\n";
  1228.    dump_context << "   otmDescent                        = " << otmDescent                        << "\n";
  1229.    dump_context << "   otmLineGap                        = " << otmLineGap                        << "\n";
  1230.    dump_context << "   otmsCapEmHeight                   = " << otmsCapEmHeight                   << "\n";
  1231.    dump_context << "   otmsXHeight                       = " << otmsXHeight                       << "\n";
  1232.    dump_context << "   otmrcFontBox.left                 = " << otmrcFontBox.left                 << "\n";
  1233.    dump_context << "   otmrcFontBox.top                  = " << otmrcFontBox.top                  << "\n";
  1234.    dump_context << "   otmrcFontBox.right                = " << otmrcFontBox.right                << "\n";
  1235.    dump_context << "   otmrcFontBox.bottom               = " << otmrcFontBox.bottom               << "\n";
  1236.    dump_context << "   otmMacAscent                      = " << otmMacAscent                      << "\n";
  1237.    dump_context << "   otmMacDescent                     = " << otmMacDescent                     << "\n";
  1238.    dump_context << "   otmMacLineGap                     = " << otmMacLineGap                     << "\n";
  1239.    dump_context << "   otmusMinimumPPEM                  = " << otmusMinimumPPEM                  << "\n";
  1240.    dump_context << "   otmptSubscriptSize.x              = " << otmptSubscriptSize.x              << "\n";
  1241.    dump_context << "   otmptSubscriptSize.y              = " << otmptSubscriptSize.y              << "\n";
  1242.    dump_context << "   otmptSubscriptOffset.x            = " << otmptSubscriptOffset.x            << "\n";
  1243.    dump_context << "   otmptSubscriptOffset.y            = " << otmptSubscriptOffset.y            << "\n";
  1244.    dump_context << "   otmptSuperscriptSize.x            = " << otmptSuperscriptSize.x            << "\n";
  1245.    dump_context << "   otmptSuperscriptSize.y            = " << otmptSuperscriptSize.y            << "\n";
  1246.    dump_context << "   otmptSuperscriptOffset.x          = " << otmptSuperscriptOffset.x          << "\n";
  1247.    dump_context << "   otmptSuperscriptOffset.y          = " << otmptSuperscriptOffset.y          << "\n";
  1248.    dump_context << "   otmsStrikeoutSize                 = " << otmsStrikeoutSize                 << "\n";
  1249.    dump_context << "   otmsStrikeoutPosition             = " << otmsStrikeoutPosition             << "\n";
  1250.    dump_context << "   otmsUnderscoreSize                = " << otmsUnderscoreSize                << "\n";
  1251.    dump_context << "   otmsUnderscorePosition            = " << otmsUnderscorePosition            << "\n";
  1252.    dump_context << "   otmpFamilyName                    = " << otmpFamilyName                    << "\n";
  1253.    dump_context << "   otmpFaceName                      = " << otmpFaceName                      << "\n";
  1254.    dump_context << "   otmpStyleName                     = " << otmpStyleName                     << "\n";
  1255.    dump_context << "   otmpFullName                      = " << otmpFullName                      << "\n";
  1256.    dump_context << "}\n";
  1257. }
  1258.  
  1259. #endif // _DEBUG
  1260.  
  1261. void COutlineTextMetricW::Empty( void )
  1262. {
  1263.    otmSize = sizeof( _OUTLINETEXTMETRICW );
  1264.  
  1265.    // TEXTMETRICW
  1266.    otmTextMetrics.tmHeight           = 0;
  1267.    otmTextMetrics.tmAscent           = 0;
  1268.    otmTextMetrics.tmDescent          = 0;
  1269.    otmTextMetrics.tmInternalLeading  = 0;
  1270.    otmTextMetrics.tmExternalLeading  = 0;
  1271.    otmTextMetrics.tmAveCharWidth     = 0;
  1272.    otmTextMetrics.tmMaxCharWidth     = 0;
  1273.    otmTextMetrics.tmWeight           = 0;
  1274.    otmTextMetrics.tmOverhang         = 0;
  1275.    otmTextMetrics.tmDigitizedAspectX = 0;
  1276.    otmTextMetrics.tmDigitizedAspectY = 0;
  1277.    otmTextMetrics.tmFirstChar        = 0;
  1278.    otmTextMetrics.tmLastChar         = 0;
  1279.    otmTextMetrics.tmDefaultChar      = 0;
  1280.    otmTextMetrics.tmBreakChar        = 0;
  1281.    otmTextMetrics.tmItalic           = 0;
  1282.    otmTextMetrics.tmUnderlined       = 0;
  1283.    otmTextMetrics.tmStruckOut        = 0;
  1284.    otmTextMetrics.tmPitchAndFamily   = 0;
  1285.    otmTextMetrics.tmCharSet          = 0;
  1286.    
  1287.    otmFiller = 0;
  1288.    
  1289.    // PANOSE
  1290.    otmPanoseNumber.bFamilyType      = 0;
  1291.    otmPanoseNumber.bSerifStyle      = 0;
  1292.    otmPanoseNumber.bWeight          = 0;
  1293.    otmPanoseNumber.bProportion      = 0;
  1294.    otmPanoseNumber.bContrast        = 0;
  1295.    otmPanoseNumber.bStrokeVariation = 0;
  1296.    otmPanoseNumber.bArmStyle        = 0;
  1297.    otmPanoseNumber.bLetterform      = 0;
  1298.    otmPanoseNumber.bMidline         = 0;
  1299.    otmPanoseNumber.bXHeight         = 0;
  1300.  
  1301.    otmfsSelection    = 0;
  1302.    otmfsType         = 0;
  1303.    otmsCharSlopeRise = 0;
  1304.    otmsCharSlopeRun  = 0;
  1305.    otmItalicAngle    = 0;
  1306.    otmEMSquare       = 0;
  1307.    otmAscent         = 0;
  1308.    otmDescent        = 0;
  1309.    otmLineGap        = 0;
  1310.    otmsCapEmHeight   = 0;
  1311.    otmsXHeight       = 0;
  1312.    
  1313.    // RECT
  1314.    otmrcFontBox.left   = 0;
  1315.    otmrcFontBox.top    = 0;
  1316.    otmrcFontBox.right  = 0;
  1317.    otmrcFontBox.bottom = 0;
  1318.  
  1319.    otmMacAscent     = 0;
  1320.    otmMacDescent    = 0;
  1321.    otmMacLineGap    = 0;
  1322.    otmusMinimumPPEM = 0;
  1323.  
  1324.    // POINT
  1325.    otmptSubscriptSize.x     = 0;
  1326.    otmptSubscriptSize.y     = 0;
  1327.    otmptSubscriptOffset.x   = 0;
  1328.    otmptSubscriptOffset.y   = 0;
  1329.    otmptSuperscriptSize.x   = 0;
  1330.    otmptSuperscriptSize.y   = 0;
  1331.    otmptSuperscriptOffset.x = 0;
  1332.    otmptSuperscriptOffset.y = 0;
  1333.  
  1334.    otmsStrikeoutSize      = 0;
  1335.    otmsStrikeoutPosition  = 0;
  1336.    otmsUnderscoreSize     = 0;
  1337.    otmsUnderscorePosition = 0;
  1338.    otmpFamilyName         = NULL;
  1339.    otmpFaceName           = NULL;
  1340.    otmpStyleName          = NULL;
  1341.    otmpFullName           = NULL;
  1342. }
  1343.  
  1344. CPerfCounterDefinition::CPerfCounterDefinition()
  1345. {
  1346.    Empty();
  1347. }
  1348.  
  1349. CPerfCounterDefinition::~CPerfCounterDefinition()
  1350. {
  1351.    Empty();
  1352. }
  1353.  
  1354. void CPerfCounterDefinition::Empty( void )
  1355. {
  1356.    ByteLength            = sizeof( PERF_COUNTER_DEFINITION );
  1357.    CounterNameTitleIndex = 0;
  1358.    CounterNameTitle      = NULL;
  1359.    CounterHelpTitleIndex = 0;
  1360.    CounterHelpTitle      = NULL;
  1361.    DefaultScale          = 0;
  1362.    DetailLevel           = 0;
  1363.    CounterType           = 0;
  1364.    CounterSize           = 0;
  1365.    CounterOffset         = 0;
  1366. }
  1367.  
  1368. CPerfInstanceDefinition::CPerfInstanceDefinition()
  1369. {
  1370.    Empty();
  1371. }
  1372.  
  1373. CPerfInstanceDefinition::~CPerfInstanceDefinition()
  1374. {
  1375.    Empty();
  1376. }
  1377.  
  1378. void CPerfInstanceDefinition::Empty( void )
  1379. {
  1380.    ByteLength             = sizeof( PERF_INSTANCE_DEFINITION );
  1381.    ParentObjectTitleIndex = 0;
  1382.    ParentObjectInstance   = 0;
  1383.    UniqueID               = 0;
  1384.    NameOffset             = 0;
  1385.    NameLength             = 0;
  1386. }
  1387.  
  1388. CPixelFormatDescriptor::CPixelFormatDescriptor()
  1389. {
  1390.    Empty();
  1391. }
  1392.  
  1393. CPixelFormatDescriptor::CPixelFormatDescriptor( const CPixelFormatDescriptor& source )
  1394. {
  1395.    Empty();
  1396.    Copy( source );
  1397. }
  1398.  
  1399. CPixelFormatDescriptor::CPixelFormatDescriptor( const tagPIXELFORMATDESCRIPTOR * source )
  1400. {
  1401.    Empty();
  1402.    Copy( source );
  1403. }
  1404.  
  1405. CPixelFormatDescriptor::~CPixelFormatDescriptor()
  1406. {
  1407.    Empty();
  1408. }
  1409.  
  1410. void CPixelFormatDescriptor::Copy( const CPixelFormatDescriptor& source )
  1411. {
  1412.    Copy( (const tagPIXELFORMATDESCRIPTOR *) &source );
  1413. }
  1414.  
  1415. void CPixelFormatDescriptor::Copy( const tagPIXELFORMATDESCRIPTOR * source )
  1416. {
  1417.    ASSERT( source != NULL );
  1418.  
  1419.    if ( source == NULL )
  1420.    {
  1421.       return;
  1422.    }
  1423.  
  1424.    nSize           = source->nSize;
  1425.    nVersion        = source->nVersion;
  1426.    dwFlags         = source->dwFlags;
  1427.    iPixelType      = source->iPixelType;
  1428.    cColorBits      = source->cColorBits;
  1429.    cRedBits        = source->cRedBits;
  1430.    cRedShift       = source->cRedShift;
  1431.    cGreenBits      = source->cGreenBits;
  1432.    cGreenShift     = source->cGreenShift;
  1433.    cBlueBits       = source->cBlueBits;
  1434.    cBlueShift      = source->cBlueShift;
  1435.    cAlphaBits      = source->cAlphaBits;
  1436.    cAlphaShift     = source->cAlphaShift;
  1437.    cAccumBits      = source->cAccumBits;
  1438.    cAccumRedBits   = source->cAccumRedBits;
  1439.    cAccumGreenBits = source->cAccumGreenBits;
  1440.    cAccumBlueBits  = source->cAccumBlueBits;
  1441.    cAccumAlphaBits = source->cAccumAlphaBits;
  1442.    cDepthBits      = source->cDepthBits;
  1443.    cStencilBits    = source->cStencilBits;
  1444.    cAuxBuffers     = source->cAuxBuffers;
  1445.    iLayerType      = source->iLayerType;
  1446.    bReserved       = source->bReserved;
  1447.    dwLayerMask     = source->dwLayerMask;
  1448.    dwVisibleMask   = source->dwVisibleMask;
  1449.    dwDamageMask    = source->dwDamageMask;
  1450. }
  1451.  
  1452. #if defined( _DEBUG )
  1453.  
  1454. void CPixelFormatDescriptor::Dump( CDumpContext& dump_context ) const
  1455. {
  1456.    dump_context << " a CPixelFormatDescriptor at " << (void *) this << "\n";
  1457.    dump_context << "{\n";
  1458.    dump_context << "   nSize           = " << nSize           << "\n";
  1459.    dump_context << "   nVersion        = " << nVersion        << "\n";
  1460.    dump_context << "   dwFlags         = " << dwFlags         << "\n";
  1461.    dump_context << "   iPixelType      = " << iPixelType      << "\n";
  1462.    dump_context << "   cColorBits      = " << cColorBits      << "\n";
  1463.    dump_context << "   cRedBits        = " << cRedBits        << "\n";
  1464.    dump_context << "   cRedShift       = " << cRedShift       << "\n";
  1465.    dump_context << "   cGreenBits      = " << cGreenBits      << "\n";
  1466.    dump_context << "   cGreenShift     = " << cGreenShift     << "\n";
  1467.    dump_context << "   cBlueBits       = " << cBlueBits       << "\n";
  1468.    dump_context << "   cBlueShift      = " << cBlueShift      << "\n";
  1469.    dump_context << "   cAlphaBits      = " << cAlphaBits      << "\n";
  1470.    dump_context << "   cAlphaShift     = " << cAlphaShift     << "\n";
  1471.    dump_context << "   cAccumBits      = " << cAccumBits      << "\n";
  1472.    dump_context << "   cAccumRedBits   = " << cAccumRedBits   << "\n";
  1473.    dump_context << "   cAccumGreenBits = " << cAccumGreenBits << "\n";
  1474.    dump_context << "   cAccumBlueBits  = " << cAccumBlueBits  << "\n";
  1475.    dump_context << "   cAccumAlphaBits = " << cAccumAlphaBits << "\n";
  1476.    dump_context << "   cDepthBits      = " << cDepthBits      << "\n";
  1477.    dump_context << "   cStencilBits    = " << cStencilBits    << "\n";
  1478.    dump_context << "   cAuxBuffers     = " << cAuxBuffers     << "\n";
  1479.    dump_context << "   iLayerType      = " << iLayerType      << "\n";
  1480.    dump_context << "   bReserved       = " << bReserved       << "\n";
  1481.    dump_context << "   dwLayerMask     = " << dwLayerMask     << "\n";
  1482.    dump_context << "   dwVisibleMask   = " << dwVisibleMask   << "\n";
  1483.    dump_context << "   dwDamageMask    = " << dwDamageMask    << "\n";
  1484.    dump_context << "}\n";
  1485. }
  1486.  
  1487. #endif // _DEBUG
  1488.  
  1489. void CPixelFormatDescriptor::Empty( void )
  1490. {
  1491.    nSize           = sizeof( tagPIXELFORMATDESCRIPTOR );
  1492.    nVersion        = 0;
  1493.    dwFlags         = 0;
  1494.    iPixelType      = 0;
  1495.    cColorBits      = 0;
  1496.    cRedBits        = 0;
  1497.    cRedShift       = 0;
  1498.    cGreenBits      = 0;
  1499.    cGreenShift     = 0;
  1500.    cBlueBits       = 0;
  1501.    cBlueShift      = 0;
  1502.    cAlphaBits      = 0;
  1503.    cAlphaShift     = 0;
  1504.    cAccumBits      = 0;
  1505.    cAccumRedBits   = 0;
  1506.    cAccumGreenBits = 0;
  1507.    cAccumBlueBits  = 0;
  1508.    cAccumAlphaBits = 0;
  1509.    cDepthBits      = 0;
  1510.    cStencilBits    = 0;
  1511.    cAuxBuffers     = 0;
  1512.    iLayerType      = 0;
  1513.    bReserved       = 0;
  1514.    dwLayerMask     = 0;
  1515.    dwVisibleMask   = 0;
  1516.    dwDamageMask    = 0;
  1517. }
  1518.  
  1519. CRasterizerStatus::CRasterizerStatus()
  1520. {
  1521.    Empty();
  1522. }
  1523.  
  1524. CRasterizerStatus::~CRasterizerStatus()
  1525. {
  1526.    Empty();
  1527. }
  1528.  
  1529. void CRasterizerStatus::Empty( void )
  1530. {
  1531.    nSize       = sizeof( _RASTERIZER_STATUS );
  1532.    wFlags      = 0;
  1533.    nLanguageID = 0;
  1534. }
  1535.  
  1536. CSecurityAttributes::CSecurityAttributes()
  1537. {
  1538.    Empty();
  1539. }
  1540.  
  1541. CSecurityAttributes::~CSecurityAttributes()
  1542. {
  1543.    Empty();
  1544. }
  1545.  
  1546. void CSecurityAttributes::Empty( void )
  1547. {
  1548.    nLength              = sizeof( SECURITY_ATTRIBUTES );
  1549.    lpSecurityDescriptor = NULL;
  1550.    bInheritHandle       = FALSE;
  1551. }
  1552.  
  1553. CSecurityQualityOfService::CSecurityQualityOfService()
  1554. {
  1555.    Empty();
  1556. }
  1557.  
  1558. CSecurityQualityOfService::~CSecurityQualityOfService()
  1559. {
  1560.    Empty();
  1561. }
  1562.  
  1563. void CSecurityQualityOfService::Empty( void )
  1564. {
  1565.    Length = sizeof( SECURITY_QUALITY_OF_SERVICE );
  1566.  
  1567.    // SECURITY_IMPERSONATION_LEVEL
  1568.    ImpersonationLevel = SecurityAnonymous;
  1569.    
  1570.    // SECURITY_CONTEXT_TRACKING_MODE
  1571.    ContextTrackingMode = FALSE;
  1572.  
  1573.    //BOOLEAN
  1574.    EffectiveOnly = FALSE;
  1575. }
  1576.  
  1577. /*
  1578. ** CSystemAuditEntry
  1579. */
  1580.  
  1581. CSystemAuditEntry::CSystemAuditEntry()
  1582. {
  1583.    Empty();
  1584. }
  1585.  
  1586. CSystemAuditEntry::CSystemAuditEntry( const CSystemAuditEntry& source )
  1587. {
  1588.    Empty();
  1589.    Copy( source );
  1590. }
  1591.  
  1592. CSystemAuditEntry::CSystemAuditEntry( const _SYSTEM_AUDIT_ACE * source )
  1593. {
  1594.    Empty();
  1595.    Copy( source );
  1596. }
  1597.  
  1598. CSystemAuditEntry::~CSystemAuditEntry()
  1599. {
  1600.    Empty();
  1601. }
  1602.  
  1603. void CSystemAuditEntry::Copy( const CSystemAuditEntry& source )
  1604. {
  1605.    Copy( (const _SYSTEM_AUDIT_ACE *) &source );
  1606. }
  1607.  
  1608. void CSystemAuditEntry::Copy( const _SYSTEM_AUDIT_ACE * source )
  1609. {
  1610.    ASSERT( source != NULL );
  1611.  
  1612.    if ( source == NULL )
  1613.    {
  1614.       return;
  1615.    }
  1616.  
  1617.    // ACE_HEADER
  1618.    Header.AceType  = source->Header.AceType;
  1619.    Header.AceFlags = source->Header.AceFlags;
  1620.    Header.AceSize  = source->Header.AceSize;
  1621.  
  1622.    // ACCESS_MASK
  1623.    Mask            = source->Mask;
  1624.    SidStart        = source->SidStart;
  1625. }
  1626.  
  1627. #if defined( _DEBUG )
  1628.  
  1629. void CSystemAuditEntry::Dump( CDumpContext& dump_context ) const
  1630. {
  1631.    dump_context << " a CSystemAuditEntry at " << (void *) this << "\n";
  1632.    dump_context << "{\n";
  1633.    dump_context << "   Header.AceType  = " << Header.AceType  << "\n";
  1634.    dump_context << "   Header.AceFlags = " << Header.AceFlags << "\n";
  1635.    dump_context << "   Header.AceSize  = " << Header.AceSize  << "\n";
  1636.    dump_context << "   Mask            = " << Mask            << "\n";
  1637.    dump_context << "   SidStart        = " << SidStart        << "\n";
  1638.    dump_context << "}\n";
  1639. }
  1640.  
  1641. #endif // _DEBUG
  1642.  
  1643. void CSystemAuditEntry::Empty( void )
  1644. {
  1645.    // ACE_HEADER
  1646.    Header.AceType  = 0;
  1647.    Header.AceFlags = 0;
  1648.    Header.AceSize  = 0;
  1649.  
  1650.    // ACCESS_MASK
  1651.    Mask            = 0;
  1652.  
  1653.    SidStart        = 0;
  1654. }
  1655.  
  1656. /*
  1657. ** CTextMetricA
  1658. */
  1659.  
  1660. CTextMetricA::CTextMetricA()
  1661. {
  1662.    Empty();
  1663. }
  1664.  
  1665. CTextMetricA::CTextMetricA( const CTextMetricA& source )
  1666. {
  1667.    Empty();
  1668.    Copy( source );
  1669. }
  1670.  
  1671. CTextMetricA::CTextMetricA( const tagTEXTMETRICA * source )
  1672. {
  1673.    Empty();
  1674.    Copy( source );
  1675. }
  1676.  
  1677. CTextMetricA::~CTextMetricA()
  1678. {
  1679.    Empty();
  1680. }
  1681.  
  1682. void CTextMetricA::Copy( const CTextMetricA& source )
  1683. {
  1684.    Copy( (const tagTEXTMETRICA *) &source );
  1685. }
  1686.  
  1687. void CTextMetricA::Copy( const tagTEXTMETRICA * source )
  1688. {
  1689.    ASSERT( source != NULL );
  1690.  
  1691.    if ( source == NULL )
  1692.    {
  1693.       return;
  1694.    }
  1695.  
  1696.    tmHeight           = source->tmHeight;
  1697.    tmAscent           = source->tmAscent;
  1698.    tmDescent          = source->tmDescent;
  1699.    tmInternalLeading  = source->tmInternalLeading;
  1700.    tmExternalLeading  = source->tmExternalLeading;
  1701.    tmAveCharWidth     = source->tmAveCharWidth;
  1702.    tmMaxCharWidth     = source->tmMaxCharWidth;
  1703.    tmWeight           = source->tmWeight;
  1704.    tmOverhang         = source->tmOverhang;
  1705.    tmDigitizedAspectX = source->tmDigitizedAspectX;
  1706.    tmDigitizedAspectY = source->tmDigitizedAspectY;
  1707.    tmFirstChar        = source->tmFirstChar;
  1708.    tmLastChar         = source->tmLastChar;
  1709.    tmDefaultChar      = source->tmDefaultChar;
  1710.    tmBreakChar        = source->tmBreakChar;
  1711.    tmItalic           = source->tmItalic;
  1712.    tmUnderlined       = source->tmUnderlined;
  1713.    tmStruckOut        = source->tmStruckOut;
  1714.    tmPitchAndFamily   = source->tmPitchAndFamily;
  1715.    tmCharSet          = source->tmCharSet;
  1716. }
  1717.  
  1718. #if defined( _DEBUG )
  1719.  
  1720. void CTextMetricA::Dump( CDumpContext& dump_context ) const
  1721. {
  1722.    dump_context << " a CTextMetricA at " << (void *) this << "\n";
  1723.    dump_context << "{\n";
  1724.    dump_context << "   tmHeight           = " << tmHeight           << "\n";
  1725.    dump_context << "   tmAscent           = " << tmAscent           << "\n";
  1726.    dump_context << "   tmDescent          = " << tmDescent          << "\n";
  1727.    dump_context << "   tmInternalLeading  = " << tmInternalLeading  << "\n";
  1728.    dump_context << "   tmExternalLeading  = " << tmExternalLeading  << "\n";
  1729.    dump_context << "   tmAveCharWidth     = " << tmAveCharWidth     << "\n";
  1730.    dump_context << "   tmMaxCharWidth     = " << tmMaxCharWidth     << "\n";
  1731.    dump_context << "   tmWeight           = " << tmWeight           << "\n";
  1732.    dump_context << "   tmOverhang         = " << tmOverhang         << "\n";
  1733.    dump_context << "   tmDigitizedAspectX = " << tmDigitizedAspectX << "\n";
  1734.    dump_context << "   tmDigitizedAspectY = " << tmDigitizedAspectY << "\n";
  1735.    dump_context << "   tmFirstChar        = " << tmFirstChar        << "\n";
  1736.    dump_context << "   tmLastChar         = " << tmLastChar         << "\n";
  1737.    dump_context << "   tmDefaultChar      = " << tmDefaultChar      << "\n";
  1738.    dump_context << "   tmBreakChar        = " << tmBreakChar        << "\n";
  1739.    dump_context << "   tmItalic           = " << tmItalic           << "\n";
  1740.    dump_context << "   tmUnderlined       = " << tmUnderlined       << "\n";
  1741.    dump_context << "   tmStruckOut        = " << tmStruckOut        << "\n";
  1742.    dump_context << "   tmPitchAndFamily   = " << tmPitchAndFamily   << "\n";
  1743.    dump_context << "   tmCharSet          = " << tmCharSet          << "\n";
  1744.    dump_context << "}\n";
  1745. }
  1746.  
  1747. #endif // _DEBUG
  1748.  
  1749. void CTextMetricA::Empty( void )
  1750. {
  1751.    tmHeight           = 0;
  1752.    tmAscent           = 0;
  1753.    tmDescent          = 0;
  1754.    tmInternalLeading  = 0;
  1755.    tmExternalLeading  = 0;
  1756.    tmAveCharWidth     = 0;
  1757.    tmMaxCharWidth     = 0;
  1758.    tmWeight           = 0;
  1759.    tmOverhang         = 0;
  1760.    tmDigitizedAspectX = 0;
  1761.    tmDigitizedAspectY = 0;
  1762.    tmFirstChar        = 0;
  1763.    tmLastChar         = 0;
  1764.    tmDefaultChar      = 0;
  1765.    tmBreakChar        = 0;
  1766.    tmItalic           = 0;
  1767.    tmUnderlined       = 0;
  1768.    tmStruckOut        = 0;
  1769.    tmPitchAndFamily   = 0;
  1770.    tmCharSet          = 0;
  1771. }
  1772.  
  1773. /*
  1774. ** CTextMetricW
  1775. */
  1776.  
  1777. CTextMetricW::CTextMetricW()
  1778. {
  1779.    Empty();
  1780. }
  1781.  
  1782. CTextMetricW::CTextMetricW( const CTextMetricW& source )
  1783. {
  1784.    Empty();
  1785.    Copy( source );
  1786. }
  1787.  
  1788. CTextMetricW::CTextMetricW( const tagTEXTMETRICW * source )
  1789. {
  1790.    Empty();
  1791.    Copy( source );
  1792. }
  1793.  
  1794. CTextMetricW::~CTextMetricW()
  1795. {
  1796.    Empty();
  1797. }
  1798.  
  1799. void CTextMetricW::Copy( const CTextMetricW& source )
  1800. {
  1801.    Copy( (const tagTEXTMETRICW *) &source );
  1802. }
  1803.  
  1804. void CTextMetricW::Copy( const tagTEXTMETRICW * source )
  1805. {
  1806.    ASSERT( source != NULL );
  1807.  
  1808.    if ( source == NULL )
  1809.    {
  1810.       return;
  1811.    }
  1812.  
  1813.    tmHeight           = source->tmHeight;
  1814.    tmAscent           = source->tmAscent;
  1815.    tmDescent          = source->tmDescent;
  1816.    tmInternalLeading  = source->tmInternalLeading;
  1817.    tmExternalLeading  = source->tmExternalLeading;
  1818.    tmAveCharWidth     = source->tmAveCharWidth;
  1819.    tmMaxCharWidth     = source->tmMaxCharWidth;
  1820.    tmWeight           = source->tmWeight;
  1821.    tmOverhang         = source->tmOverhang;
  1822.    tmDigitizedAspectX = source->tmDigitizedAspectX;
  1823.    tmDigitizedAspectY = source->tmDigitizedAspectY;
  1824.    tmFirstChar        = source->tmFirstChar;
  1825.    tmLastChar         = source->tmLastChar;
  1826.    tmDefaultChar      = source->tmDefaultChar;
  1827.    tmBreakChar        = source->tmBreakChar;
  1828.    tmItalic           = source->tmItalic;
  1829.    tmUnderlined       = source->tmUnderlined;
  1830.    tmStruckOut        = source->tmStruckOut;
  1831.    tmPitchAndFamily   = source->tmPitchAndFamily;
  1832.    tmCharSet          = source->tmCharSet;
  1833. }
  1834.  
  1835. #if defined( _DEBUG )
  1836.  
  1837. void CTextMetricW::Dump( CDumpContext& dump_context ) const
  1838. {
  1839.    dump_context << " a CTextMetricW at " << (void *) this << "\n";
  1840.    dump_context << "{\n";
  1841.    dump_context << "   tmHeight           = " << tmHeight           << "\n";
  1842.    dump_context << "   tmAscent           = " << tmAscent           << "\n";
  1843.    dump_context << "   tmDescent          = " << tmDescent          << "\n";
  1844.    dump_context << "   tmInternalLeading  = " << tmInternalLeading  << "\n";
  1845.    dump_context << "   tmExternalLeading  = " << tmExternalLeading  << "\n";
  1846.    dump_context << "   tmAveCharWidth     = " << tmAveCharWidth     << "\n";
  1847.    dump_context << "   tmMaxCharWidth     = " << tmMaxCharWidth     << "\n";
  1848.    dump_context << "   tmWeight           = " << tmWeight           << "\n";
  1849.    dump_context << "   tmOverhang         = " << tmOverhang         << "\n";
  1850.    dump_context << "   tmDigitizedAspectX = " << tmDigitizedAspectX << "\n";
  1851.    dump_context << "   tmDigitizedAspectY = " << tmDigitizedAspectY << "\n";
  1852.    dump_context << "   tmFirstChar        = " << tmFirstChar        << "\n";
  1853.    dump_context << "   tmLastChar         = " << tmLastChar         << "\n";
  1854.    dump_context << "   tmDefaultChar      = " << tmDefaultChar      << "\n";
  1855.    dump_context << "   tmBreakChar        = " << tmBreakChar        << "\n";
  1856.    dump_context << "   tmItalic           = " << tmItalic           << "\n";
  1857.    dump_context << "   tmUnderlined       = " << tmUnderlined       << "\n";
  1858.    dump_context << "   tmStruckOut        = " << tmStruckOut        << "\n";
  1859.    dump_context << "   tmPitchAndFamily   = " << tmPitchAndFamily   << "\n";
  1860.    dump_context << "   tmCharSet          = " << tmCharSet          << "\n";
  1861.    dump_context << "}\n";
  1862. }
  1863.  
  1864. #endif // _DEBUG
  1865.  
  1866. void CTextMetricW::Empty( void )
  1867. {
  1868.    tmHeight           = 0;
  1869.    tmAscent           = 0;
  1870.    tmDescent          = 0;
  1871.    tmInternalLeading  = 0;
  1872.    tmExternalLeading  = 0;
  1873.    tmAveCharWidth     = 0;
  1874.    tmMaxCharWidth     = 0;
  1875.    tmWeight           = 0;
  1876.    tmOverhang         = 0;
  1877.    tmDigitizedAspectX = 0;
  1878.    tmDigitizedAspectY = 0;
  1879.    tmFirstChar        = 0;
  1880.    tmLastChar         = 0;
  1881.    tmDefaultChar      = 0;
  1882.    tmBreakChar        = 0;
  1883.    tmItalic           = 0;
  1884.    tmUnderlined       = 0;
  1885.    tmStruckOut        = 0;
  1886.    tmPitchAndFamily   = 0;
  1887.    tmCharSet          = 0;
  1888. }
  1889.  
  1890. CWindowPlacement::CWindowPlacement()
  1891. {
  1892.    Empty();
  1893. }
  1894.  
  1895. CWindowPlacement::CWindowPlacement( const CWindowPlacement& source )
  1896. {
  1897.    Empty();
  1898.    Copy( source );
  1899. }
  1900.  
  1901. CWindowPlacement::CWindowPlacement( const tagWINDOWPLACEMENT * source )
  1902. {
  1903.    Empty();
  1904.    Copy( source );
  1905. }
  1906.  
  1907. CWindowPlacement::~CWindowPlacement()
  1908. {
  1909.    Empty();
  1910. }
  1911.  
  1912. void CWindowPlacement::Copy( const CWindowPlacement& source )
  1913. {
  1914.    Copy( (const tagWINDOWPLACEMENT *) &source );
  1915. }
  1916.  
  1917. void CWindowPlacement::Copy( const tagWINDOWPLACEMENT * source )
  1918. {
  1919.    ASSERT( source != NULL );
  1920.  
  1921.    if ( source == NULL )
  1922.    {
  1923.       return;
  1924.    }
  1925.  
  1926.    length  = source->length;
  1927.    flags   = source->flags;
  1928.    showCmd = source->showCmd;
  1929.  
  1930.    // POINT
  1931.    ptMinPosition.x = source->ptMinPosition.x;
  1932.    ptMinPosition.y = source->ptMinPosition.y;
  1933.    ptMaxPosition.x = source->ptMaxPosition.x;
  1934.    ptMaxPosition.y = source->ptMaxPosition.y;
  1935.  
  1936.    // RECT
  1937.    rcNormalPosition.left   = source->rcNormalPosition.left;
  1938.    rcNormalPosition.top    = source->rcNormalPosition.top;
  1939.    rcNormalPosition.right  = source->rcNormalPosition.right;
  1940.    rcNormalPosition.bottom = source->rcNormalPosition.bottom;
  1941. }
  1942.  
  1943. #if defined( _DEBUG )
  1944.  
  1945. void CWindowPlacement::Dump( CDumpContext& dump_context ) const
  1946. {
  1947.    dump_context << " a CWindowPlacement at " << (void *) this << "\n";
  1948.    dump_context << "{\n";
  1949.    dump_context << "   length                  = " << length                  << "\n";
  1950.    dump_context << "   flags                   = " << flags                   << "\n";
  1951.    dump_context << "   showCmd                 = " << showCmd                 << "\n";
  1952.    dump_context << "   ptMinPosition.x         = " << ptMinPosition.x         << "\n";
  1953.    dump_context << "   ptMinPosition.y         = " << ptMinPosition.y         << "\n";
  1954.    dump_context << "   ptMaxPosition.x         = " << ptMaxPosition.x         << "\n";
  1955.    dump_context << "   ptMaxPosition.y         = " << ptMaxPosition.y         << "\n";
  1956.    dump_context << "   rcNormalPosition.left   = " << rcNormalPosition.left   << "\n";
  1957.    dump_context << "   rcNormalPosition.top    = " << rcNormalPosition.top    << "\n";
  1958.    dump_context << "   rcNormalPosition.right  = " << rcNormalPosition.right  << "\n";
  1959.    dump_context << "   rcNormalPosition.bottom = " << rcNormalPosition.bottom << "\n";
  1960.    dump_context << "}\n";
  1961. }
  1962.  
  1963. #endif // _DEBUG
  1964.  
  1965. void CWindowPlacement::Empty( void )
  1966. {
  1967.    length  = sizeof( tagWINDOWPLACEMENT );
  1968.    flags   = 0;
  1969.    showCmd = 0;
  1970.  
  1971.    // POINT
  1972.    ptMinPosition.x = 0;
  1973.    ptMinPosition.y = 0;
  1974.    ptMaxPosition.x = 0;
  1975.    ptMaxPosition.y = 0;
  1976.  
  1977.    // RECT
  1978.    rcNormalPosition.left   = 0;
  1979.    rcNormalPosition.top    = 0;
  1980.    rcNormalPosition.right  = 0;
  1981.    rcNormalPosition.bottom = 0;
  1982. }
  1983.